{template 'common/header'}
<div id="menu">
    <ul class="nav nav-tabs">
        <li {if $_GPC['action'] == ''}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('user', array('action' => ''));}">用户列表</a>
        </li>
        <li {if $_GPC['action'] == 'yqlb'}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('user', array('action' => ''));}">邀请列表</a>
        </li>
        <li {if $_GPC['action'] == 'add'}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('user', array('action' => ''));}">投资记录</a>
        </li>
        <li {if $_GPC['action'] == 'zuijin'}class="active"{/if}>
        <a href="{php echo $this->createWebUrl('user', array('action' => 'zuijin'));}">最近记录</a>
        </li>
    </ul>
</div>


{if $_GPC['action'] ==''}

<div class="main">
    <div class="panel panel-info">
        <div class="panel-heading">筛选</div>
        <div class="panel-body">
            <form action="{php echo $this->createWebUrl('user')}" method="post" class="form-horizontal">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">用户uid:</label>
                    <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                        <input type="text" name="uid" value="{$uid}" class="form-control" style="display: inline-block;">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">用户昵称:</label>
                    <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                        <input type="text" name="nickname" value="{$nickname}" class="form-control" style="display: inline-block;">
                    </div>
                </div>
                <div class="form-group" style="text-align:center;">
                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                        <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                    </div>
                </div>
            </form>
        </div>
    </div>



<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>余额</th>
        <th>注册时间</th>
        <th style="width:250px;">操作</th>
    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['nickname']}</td>
        <td>{$v['money']}</td>
        <td>{$v['reg_time']}</td>
        <td>
            <!--<a class="btn btn-warning btn-sm" href="{php echo $this->createWebUrl('info',array('action'=>'add_class', 'id' => $v['id']));}">查看</a>-->
            {if $v[state]==1}
            <a class="btn btn-success btn-sm" href="{php echo $this->createWebUrl('user',array('action'=>'up_user', 'id' => $v['id'], 'state1'=>$v['state']));}">取消拉黑</a>
            {else}
            <a class="btn btn-danger btn-sm" href="{php echo $this->createWebUrl('user',array('action'=>'up_user', 'id' => $v['id'], 'state1'=>$v['state']));}">拉黑</a>
            {/if}
            <a class="btn btn-success btn-sm" href="{php echo $this->createWebUrl('user',array('action'=>'yqlb', 'uid' => $v['id']));}">邀请记录</a>
            <a class="btn btn-success btn-sm" href="{php echo $this->createWebUrl('user',array('action'=>'add', 'openid' => $v['openid']));}">投资记录</a>
        </td>
    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}

{if $_GPC['action'] =='yqlb'}
<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>余额</th>
        <th>注册时间</th>
    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['nickname']}</td>
        <td>{$v['money']}</td>
        <td>{$v['reg_time']}</td>
        <td>

        </td>
    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}

{if $_GPC['action'] =='add'}
<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>金额</th>
        <th>状态</th>
        <th style="width:250px;">时间</th>
    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['user']['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['user']['nickname']}</td>
        <td>{$v['fee']}</td>
        <td>{if $v['zstate'] ==0}投资{else}追加{/if}</td>
        <td>{$v['time']} </td>

    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}

{if $_GPC['action'] =='zuijin'}
<table class="table table-hover">
    <thead class="navbar-inner">
    <tr>
        <th>头像</th>
        <th>昵称</th>
        <th>金额</th>
        <th>状态</th>
        <th style="width:250px;">时间</th>
    </tr>
    </thead>
    <tbody>
    {loop $res $v}
    <tr>
        <td><img src="{php echo $v['user']['headimgurl']}" width="50px" height="50px"></td>
        <td>{$v['user']['nickname']}</td>
        <td>{$v['fee']}</td>
        <td>{if $v['zstate'] ==0}投资{else}追加{/if}</td>
        <td>{$v['time']} </td>

    </tr>
    {/loop}
    </tbody>
</table>
<div class="col-xs-12">
    {php echo $pager}
</div>
{/if}




{template 'common/footer'}
